//
//  SmallCollectionViewCell.m
//  HandWork
//
//  Created by 王阳阳 on 16/1/21.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "SmallCollectionViewCell.h"
//#import "GiftModel.h"
@implementation SmallCollectionViewCell

- (void)dealloc
{
    [_bgimg release];
    [super dealloc];
}
#pragma mark - 初始化
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creat];
    }
    return self;
}
- (void)creat
{
    //图片
    self.bgimg = [[UIImageView alloc]init];
    [self.contentView addSubview:self.bgimg];
    [_bgimg release];
    
//    self.blackView = [[UIView alloc] init];
//    [self.blackView setBackgroundColor:[UIColor blackColor]];
//    [self.bgimg addSubview:self.blackView];
//    self.blackView.alpha = 0.5;
//    
//    
//    self.blackView.userInteractionEnabled = YES;
//    [_blackView release];

}
#pragma mark - 布局
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super applyLayoutAttributes:layoutAttributes];
    self.bgimg.frame = self.contentView.frame;

//    self.blackView.frame = self.bgimg.frame;
}
//
//- (void)setSanModel:(GiftModel *)sanModel
//{
//    if (_gifmodel != sanModel)
//    {
//        [_gifmodel release];
//        _gifmodel = [sanModel retain];
//        
//    }
////    [self.bgimg sd_setImageWithURL:[NSURL URLWithString:sanModel.titlepic_m] placeholderImage:[UIImage imageNamed:@"jiazaitu"]];
//    if (_gifmodel.isClear)
//    {
//        _blackView.alpha = 0;
//    }else {
//        _blackView.alpha = 0.5;
//    }
//}

@end
